name: pre-commit run_id: commands[2] env HOME: /home/jenkins env LANG: C.UTF-8 env OLM_TIMER1: 3000 env OLM_TIMER2: 2000 env PATH: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-6EHR/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 2854484191 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/transportpce-tox-verify-transportpce-master/.tox env VIRTUAL_ENV: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2475 cwd: /w/workspace/transportpce-tox-verify-transportpce-master/tests allow: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit/bin/*:sh:cpan:sudo:which:fixCIcentOS8reposMirrors.sh cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [WARNING] hook id `perltidy` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Initializing environment for https://github.com/perltidy/perltidy. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/perltidy/perltidy. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing tests/transportpce_tests/tapi/test06_pce_tapi_transversal.py Tabs remover.............................................................Passed autopep8.................................................................Failed - hook id: autopep8 - files were modified by this hook perltidy.................................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/transportpce_tests/tapi/test06_pce_tapi_transversal.py b/tests/transportpce_tests/tapi/test06_pce_tapi_transversal.py index 446ef9493..c34982809 100644 --- a/tests/transportpce_tests/tapi/test06_pce_tapi_transversal.py +++ b/tests/transportpce_tests/tapi/test06_pce_tapi_transversal.py @@ -43,76 +43,76 @@ class TransportPCEtest(unittest.TestCase): tapi_topo = {"topology-id": "TBD"} load_topo_input = { - "input": { - "file-path": "../../sample_configs/tapiSBItopo/tapiSbiTopo160226.json", - "topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b" - } - } + "input": { + "file-path": "../../sample_configs/tapiSBItopo/tapiSbiTopo160226.json", + "topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b" + } + } daexim_import_input = { - "check-models": "true", - "clear-stores": "none", - "file-name-filter": "odl_backup_operational2.json", - "strict-data-consistency": "true" - } + "check-models": "true", + "clear-stores": "none", + "file-name-filter": "odl_backup_operational2.json", + "strict-data-consistency": "true" + } daexim_export_input = { - "data-export-import:run-at": 50, - "data-export-import:local-node-only": "true", - "data-export-import:strict-data-consistency": "true", - "data-export-import:included-modules" : [ - { - "module-name": "tapi-common", - "data-store": "operational" - } - ] - } + "data-export-import:run-at": 50, + "data-export-import:local-node-only": "true", + "data-export-import:strict-data-consistency": "true", + "data-export-import:included-modules": [ + { + "module-name": "tapi-common", + "data-store": "operational" + } + ] + } rpc_interdomain_A1DEG1_to_TA1DEG1_input = { - "a-end": { - "rdm-node": "ROADMA1", - "deg-num": "1", - "termination-point": "DEG1-TTP-TXRX" - }, - "z-end": { - "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", - "rdm-node-uuid": "f929e2dc-3c08-32c3-985f-c126023efc43", - "rdm-nep-uuid" : "21190688-06b5-32be-be30-c73c9199b603" - } - } + "a-end": { + "rdm-node": "ROADMA1", + "deg-num": "1", + "termination-point": "DEG1-TTP-TXRX" + }, + "z-end": { + "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", + "rdm-node-uuid": "f929e2dc-3c08-32c3-985f-c126023efc43", + "rdm-nep-uuid": "21190688-06b5-32be-be30-c73c9199b603" + } + } rpc_interdomain_TA1DEG1_to_A1DEG1_input = { - "z-end": { - "rdm-node": "ROADMA1", - "deg-num": "1", - "termination-point": "DEG1-TTP-TXRX" - }, - "a-end": { - "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", - "rdm-node-uuid": "f929e2dc-3c08-32c3-985f-c126023efc43", - "rdm-nep-uuid" : "21190688-06b5-32be-be30-c73c9199b603" - } - } + "z-end": { + "rdm-node": "ROADMA1", + "deg-num": "1", + "termination-point": "DEG1-TTP-TXRX" + }, + "a-end": { + "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", + "rdm-node-uuid": "f929e2dc-3c08-32c3-985f-c126023efc43", + "rdm-nep-uuid": "21190688-06b5-32be-be30-c73c9199b603" + } + } rpc_interdomain_C1DEG2_to_TC1DEG2_input = { - "a-end": { - "rdm-node": "ROADMC1", - "deg-num": "2", - "termination-point": "DEG2-TTP-TXRX" - }, - "z-end": { - "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", - "rdm-node-uuid": "7a44ea23-90d1-357d-8754-6e88d404b670", - "rdm-nep-uuid" : "4085f64d-fc95-3e0b-845b-35ef5779bb25" - } - } + "a-end": { + "rdm-node": "ROADMC1", + "deg-num": "2", + "termination-point": "DEG2-TTP-TXRX" + }, + "z-end": { + "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", + "rdm-node-uuid": "7a44ea23-90d1-357d-8754-6e88d404b670", + "rdm-nep-uuid": "4085f64d-fc95-3e0b-845b-35ef5779bb25" + } + } rpc_interdomain_C1DEG2_to_TC1DEG2_input = { - "z-end": { - "rdm-node": "ROADMC1", - "deg-num": "2", - "termination-point": "DEG2-TTP-TXRX" - }, - "a-end": { - "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", - "rdm-node-uuid": "7a44ea23-90d1-357d-8754-6e88d404b670", - "rdm-nep-uuid" : "4085f64d-fc95-3e0b-845b-35ef5779bb25" - } - } + "z-end": { + "rdm-node": "ROADMC1", + "deg-num": "2", + "termination-point": "DEG2-TTP-TXRX" + }, + "a-end": { + "rdm-topology-uuid": "a21e4756-4d70-3d40-95b6-f7f630b4a13b", + "rdm-node-uuid": "7a44ea23-90d1-357d-8754-6e88d404b670", + "rdm-nep-uuid": "4085f64d-fc95-3e0b-845b-35ef5779bb25" + } + } @classmethod def setUpClass(cls): @@ -134,12 +134,12 @@ class TransportPCEtest(unittest.TestCase): # pylint: disable=bare-except TOPO_TAPI_SBI_FILE_ORG_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "sample_configs", "tapiSBItopo", - "tapiSbiTopo160226.json") + "..", "..", "sample_configs", "tapiSBItopo", + "tapiSbiTopo160226.json") print("sourcefile copied: {}".format(TOPO_TAPI_SBI_FILE_ORG_PATH)) TOPO_TAPI_SBI_FILE_DEST_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "..", "karaf", "target", "assembly", "daexim", - "odl_backup_operational2.json") + "..", "..", "..", "karaf", "target", "assembly", "daexim", + "odl_backup_operational2.json") print("Destfile copied to : {}".format(TOPO_TAPI_SBI_FILE_DEST_PATH)) shutil.copyfile(TOPO_TAPI_SBI_FILE_ORG_PATH, TOPO_TAPI_SBI_FILE_DEST_PATH) # First import TAPI context so that the file odl_backup_models.json is created by DAEXIM @@ -224,7 +224,7 @@ class TransportPCEtest(unittest.TestCase): # TAPI SBI ABS shall have 2(SPDR-STA1/STC1)x6(XPDR1(1)/2(4)/3(1) OTS Network ports # + 2 (ROADM-TA1/RTC1) x 2 (DEG1+2) TTP OTS ports + 4x2(ROADM TAI SRG1/3) + 4 (ROADM TCI SRG1) OTS PP Ports self.assertEqual(len(response['node']['ietf-network-topology:termination-point']), 28, - 'TAPI SBI ABS shall have a total of 28 OTS ports (SPDR Network ports & ROADM PP and TTP ports') + 'TAPI SBI ABS shall have a total of 28 OTS ports (SPDR Network ports & ROADM PP and TTP ports') def test_04_load_sbi_topology(self): # pylint: disable=too-many-branches @@ -233,13 +233,13 @@ class TransportPCEtest(unittest.TestCase): 'transportpce-networkutils', 'init-inter-domain-links', self.rpc_interdomain_TA1DEG1_to_A1DEG1_input) print("TIME TO CHECK LINK") time.sleep(50) - if (response['status_code'] != requests.codes.ok + if (response['status_code'] != requests.codes.ok or 'Unidirectional Roadm-to-Roadm Inter-Domain Link created successfully' - not in response["output"]["result"]): + not in response["output"]["result"]): print("interdomain Link creation from ROADMA1 to ROADMTA1 failed") else: print("interdomain Link creation from ROADMA1 to ROADMTA1 succeeded") - + # Config ROADMA1-ROADMTA oms-attributes data = {"span": { "auto-spanloss": "true",